<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String contextPath = (String)request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>手机预约挂号系统</title>
<link type="text/css"  href="<%=contextPath%>/css/reset.css" rel="stylesheet" />
<!--must have for everypage-->
<link type="text/css"  href="<%=contextPath%>/css/home.css" rel="stylesheet" />

<script type="text/javascript" src="<%=contextPath%>/js/jquery/jquery-1.7.2.min.js"></script>
<!--log_tabJS start-->
<script type="text/javascript" language="javascript">
function loginSubmit()
{
	var loginId=$("#loginId").val();
	var password = $("#password").val();
	var number = $("#number").val();
	if (loginId.length<1) {
		alert("用户名不能为空！");
		return false;
	}
	if (password.length<1) {
		alert("密码不能为空！");
		return false;
	}
	if (number.length<1) {
		alert("验证码不能为空！");
		return false;
	}
	var tar_form = document.getElementById("myFrom");
    tar_form.action="<%=contextPath%>/userLogin.do?method=login";
    tar_form.submit();
    document.myFrom.reset(); 
    
}

function showing(){
    document.getElementById("coding").src='<%=contextPath%>/servlet/imageServlet?time='+Math.random();
}

if (window != top) 
top.location.href = location.href;

</script>
<!--log_tabJS end-->
</head>
<body class="Back" onload="document.getElementById('loginId').focus()">
<div class="Backstage">
  <div class="loginbox">
    <form name="myFrom" id="myFrom" method="post" action="<%=contextPath%>/userLogin.do?method=login">
      <!--h_ul start-->
      <ul class="h_ul login">
        <li>
          <label class="form-label" for="loginId"  id="login_id_type">用户名：</label>
          <input type="text" class="hors_input_in" id="loginId" name="loginId"  maxlength="50" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"> 
        </li>
        <li>
          <label class="form-label" for="password">密码：</label>
          <input type="password" class="hors_input_in" id="password" maxlength="255" name="password" >
        </li>
        <li>
          <label class="form-label" for="number">验证码：</label>
          <input type="text" id="number" name="number" maxlength="4" class="hors_input_in">
        </li>
        <li>
          <label class="form-label">&nbsp;</label>
          <img id="coding" alt="user code" src="<%=contextPath%>/servlet/imageServlet" /> 
          <a href="javascript:showing()">看不清，换一张</a>
        </li>
        
        <li>
        	<span style="color:#C00;margin:0px 0px 0px 25px;">${message }</span>
        </li>
        <li>
          <label class="form-label">&nbsp;</label>
         <input type="submit" name="submit" value=" 登录" onclick="loginSubmit()" class="hors_input_btn" />
         
        </li>
      </ul>
      <!--h_ul end-->
    </form>
    
    </div>
  </div>
</div>
</body>
</html>
